package com.fulihui.systemcore.api;

import org.near.servicesupport.request.TPageRequest;
import org.near.servicesupport.request.TRequest;
import org.near.servicesupport.result.BaseResult;
import org.near.servicesupport.result.TPageResult;
import org.near.servicesupport.result.TSingleResult;

import com.fulihui.systemcore.dto.ApiTemplateDTO;
import com.fulihui.systemcore.request.apitemplate.ApiTemplateCreateRequest;
import com.fulihui.systemcore.request.apitemplate.ApiTemplateUpdateRequest;

/**
 * Created by  lz on 2017-5-31.
 */
public interface ApiTemplateService {

    /**
     * 创建http-api服务来源
     *
     * @param request the request
     * @return the t single result
     */
    TSingleResult<Long> save(ApiTemplateCreateRequest request);

    /**
     * 修改http-api服务来源
     *
     * @param request the request
     * @return the t single result
     */
    TSingleResult<Long> update(ApiTemplateUpdateRequest request);

    /**
     * 分页查询基本http-api服务来源
     *
     * @param request the request
     * @return the t page result
     */
    TPageResult<ApiTemplateDTO> queryPage(TPageRequest request);

    /**
     * 根据主键pk查询
     *
     * @param request the request
     * @return the t single result
     */
    TSingleResult<ApiTemplateDTO> queryByPk(TRequest<Long> request);

    /**
     * 根据主键pk删除配置信息
     *
     * @param request the request
     * @return the base result
     */
    BaseResult deleteByPk(TRequest<Long> request);
}
